/**
 * Created by maxiaoqiang on 2018/6/25.
 */
import React, {Component} from "react";
import {Link} from "react-router-dom"
import {Icon, Menu} from 'antd';
const {SubMenu} = Menu;

import "./index.less";

class LayoutSider extends Component {

    constructor(props) {
        super(props);
    }

    render() {
        return (
            <Menu
                theme="dark"
                mode="inline"
                defaultSelectedKeys={['menu0_0']}
                defaultOpenKeys={['menu0']}
                inlineCollapsed={true}
            >
                <SubMenu
                    key="menu0"
                    title={
                        <span>
                            <Icon type="home" />
                            <span>首页</span>
                        </span>
                    }
                >
                    <Menu.Item key="menu0_0">
                        <Link to="/exam/userinfo">首页</Link>
                    </Menu.Item>
                    <Menu.Item key="menu0_1">
                        <Link to="/exam/setting">个人中心</Link>
                    </Menu.Item>
                </SubMenu>

                <Menu.Item key="menu1" style={{display:"none"}}>
                    <Link to="/exam/authority">
                        <Icon type="lock"/>
                        <span>权限管理</span>
                    </Link>
                </Menu.Item>
                <Menu.Item key="menu2" style={{display:"none"}}>
                    <Link to="/exam/usermanage">
                        <Icon type="solution" />
                        <span>用户管理</span>
                    </Link>
                </Menu.Item>
                <SubMenu
                    key="menu3"
                    title={
                        <span>
                            <Icon type="profile" />
                            <span>课程管理</span>
                        </span>
                    }
                >
                    <Menu.Item key="menu3_0">
                        <Link to="/exam/course/category">类目管理</Link>
                    </Menu.Item>
                    <Menu.Item key="menu3_1">
                        <Link to="/exam/course/subject">科目管理</Link>
                    </Menu.Item>
                    <Menu.Item key="menu3_2">
                        <Link to="/exam/course/chapter">章节管理</Link>
                    </Menu.Item>
                </SubMenu>

                <Menu.Item key="menu4">
                    <Link to="/exam/questionbank">
                        <Icon type="database" />
                        <span>题库管理</span>
                    </Link>
                </Menu.Item>
                <Menu.Item key="menu5">
                    <Link to="/exam/grade">
                        <Icon type="line-chart" />
                        <span>成绩分析</span>
                    </Link>
                </Menu.Item>
                <Menu.Item key="menu6">
                    <Link to="/exam/official">
                        <Icon type="edit" />
                        <span>在线考试</span>
                    </Link>
                </Menu.Item>
                <Menu.Item key="menu7">
                    <Link to="/exam/mistake">
                        <Icon type="lock"/>
                        <span>错题集</span>
                    </Link>
                </Menu.Item>
            </Menu>
        )
    }

}

export default LayoutSider;